<%@ page contentType="text/html;charset=UTF-8" %>

<link rel="stylesheet" href="${ctxStatic}/bootstrap/3/css/bootstrap.min.css">
<link rel="stylesheet" href="${ctxStatic}/css/site.min.css">

<script src="${ctxStatic}/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/bootstrap/3/js/bootstrap.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/layer/layer.js" type="text/javascript"></script>

<script>
    var ctxStatic='${ctxStatic}';
    $(function () {
        showTime();
    });

    function formatDate(nS) {
        if (nS == null || nS == undefined) {
            return "";
        } else {
            var now = new Date(nS);
            var year = now.getFullYear();
            var month = now.getMonth() + 1;
            var date = now.getDate();
            return year + "-" + month + "-" + date;
        }
    }

    function showTime() {
        var curTime = new Date();
        var myHour = curTime.getHours();
        var myMinutes = curTime.getMinutes();

        curTime.toLocaleDateString();
        if (curTime.getHours() < 10) {
            myHour = '0' + curTime.getHours();  //补齐
        }
        if (curTime.getMinutes() < 10) {
            myMinutes = '0' + curTime.getMinutes();  //补齐
        }
        $("#date").html(curTime.getFullYear() + '年' + (curTime.getMonth() + 1) + '月' + curTime.getDate() + '日');
        $("#time").html(myHour + ':' + myMinutes);

        $("#week").html("星期" + "日一二三四五六".charAt(new Date().getDay()));

        setTimeout("showTime()", 1000);
    }
</script>